<template>
    <div class="modebox">
        <div class="header">
            <div>{{title}}</div>
            <div><i @click="handleCloseModel" class="el-icon-close"></i></div>
        </div>
        <div class="content">
            <slot></slot>
        </div>
    </div>
</template>
<script>
export default {
    name:"SimpleModel",
    props:{
        title:{
            type:String,
            default:""
        },
        handleClose:{
            type: Function,
            default:null
        }
    },
    methods:{
        handleCloseModel(){
            this.$emit("handleClose",false)
        }
    }
}
</script>

<style scoped lang="scss">
    .modebox{
        position: absolute;
        top:50%;
        left:50%;
        transform: translate(-50%,-50%);
        border-radius: 12px;
        overflow: hidden;
        .header{
            color: #fff;
            background-color: #0b83fe;
            padding: 12px;
            display: flex;
            justify-content: space-between;
            .el-icon-close{
                font-weight: bolder;
            }
        }
        .content{
            background-color: #fff;
            padding: 6px;
        }
        
    }
</style>